package yh;

/**
 * 变量的定义
 */
public class VariableDemo {
    public static void main(String[] args) {
        //声明变量
        int a=1;
        Long a1;
        //赋值
        a=1;
        a1=123L;
        System.out.println(a);
        System.out.println(a1);
        //赋值
        a=2;
        System.out.println(a);
        //声明变量并赋值
        int b=1;
        System.out.println(b);
        //声明多个变量
        int c,d,e;
        c=1;
        d=2;
        e=3;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        //声明多个字面量
        int i=1,j=2,k=3;
        System.out.println(i);
        System.out.println(j);
        System.out.println(k);
    }
}

